//
//  VPLoginLeftCell.m
//  VPLoginComponentForPod
//
//  Created by verne on 2017/1/5.
//  Copyright © 2017年 vernepung. All rights reserved.
//

#import "VPLoginLeftCell.h"
#import "Helper+Validate.h"
@interface VPLoginLeftCell()
@property (weak, nonatomic) IBOutlet UIImageView *imgLeftIconImageView;
@property (weak, nonatomic) IBOutlet UILabel *txtTitleLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *txtTitleLabelLeftConstraint;

@end
@implementation VPLoginLeftCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)fillCellWithTitle:(NSString *)title imageName:(NSString *)image{
    UIImage *leftIcon = nil;
    if (![Helper isBlankString:image]){
        leftIcon = [UIImage imageNamed:image];
    }
    if (!image || !leftIcon){
        self.txtTitleLabelLeftConstraint.constant = 0;
        self.imgLeftIconImageView.image = nil;
    }else{
        self.txtTitleLabelLeftConstraint.constant = 35;
        self.imgLeftIconImageView.image = leftIcon;
    }
    self.txtTitleLabel.text = title;
}

@end
